<%@ tag body-content="scriptless" dynamic-attributes="dynattrs"
        pageEncoding="windows-1252" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="agent" uri="http://gettestfire.org/taglibs/agent" %>


<%@ attribute name="testset" required="true" rtexprvalue="true" type="org.testfire.model.TestsetType" %>


<c:set var="tsResults" value="${testset.testsetResults}"/>
<c:choose>
    <c:when test="${empty tsResults}">
        <h3 style="text-align:center;">${testset.name} has not been run.</h3>
    </c:when>
    <c:otherwise>
        <h3 style="text-align:center;">${testset.name}</h3>
        <table style="width:70%;margin-left:15%;" border="2" cellpadding="2">
            <thead>
                <tr style="font-weight:bold;font-size:120%">
                    <td>Was Successful</td>
                    <td>Run Date</td>
                    <td>Run Count</td>
                    <td>Failure Count</td>
                    <td>Ignore Count</td>
                    <td>Time Elapsed</td>
                    <td>Messages</td>
                </tr>
            </thead>
            <tbody>
                <c:forEach items="${tsResults}" var="tsResult">
                    <agent:testsetResult testsetResult="${tsResult}"/>
                </c:forEach>
            </tbody>
        </table>
        <c:if test="${empty param.noform}">
            </form>
        </c:if>
    </c:otherwise>

</c:choose>
